#ifndef QUANTIZATIONMATRIX_H
#define QUANTIZATIONMATRIX_H

#include <stdint.h>
#include "Eigen/Dense"

class QuantizationMatrix
{
public:
    // Initializes each element at 1
    QuantizationMatrix();
    QuantizationMatrix(int columnLength);
    QuantizationMatrix(const QuantizationMatrix &qm);
    ~QuantizationMatrix() { delete[] _quantizationMatrix; }

    const int &operator[]( const int i ) const { return _quantizationMatrix[i]; }
    const int columnLength() const { return _columnLength; }
    const int size() const { return _size; }

    /*
    ** When using setMatrix mind the way the matrix is defined.
    ** The matrix is column major.
    */
    void setMatrix(uint8_t *matrix);

    void setMatrix(int *matrix);

    /*
    ** When using setMatrixRowMajor note that the row major array is inputted in the column major of this class.
    ** The class matrix is column major.
    */
    void setMatrixRowMajor(int *matrix);

    int* getQuantizationMatrix(){ return _quantizationMatrix;}

private:
    // column major matrix
    int *_quantizationMatrix;
    int _columnLength;
    int _size;
};

#endif // QUANTIZATIONMATRIX_H
